<template>
    <div v-if="isShow" class="loading">
        Loading.. . 自定义vue3插件
    </div>
</template>
<script setup lang='ts'>
import { ref } from 'vue'
const isShow = ref<boolean>(false)

const show = () => isShow.value = true
const hide = () => isShow.value = false
// 抛出后再index.ts获取
defineExpose({
    show,
    hide,
    isShow
})
</script>

<style scoped>
.loading {
    background: black;
    opacity: 0.8;
    font-size: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    color: white;
}
</style>